package cn.chint.manage.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import cn.chint.manage.dao.UserDao;
import cn.chint.manage.service.UserService;
import cn.chint.po.Orders;
import cn.chint.po.User;
@Service
public class UserServiceImpl implements UserService{

	@Autowired
	UserDao userDao; 

	@Transactional(value = "transactionManager", propagation = Propagation.REQUIRED, isolation = Isolation.DEFAULT, rollbackForClassName = {"java.lang.Throwable"})
	public void getIns(User user) {
		userDao.getIns(user);
	}
	@Transactional(value = "transactionManager", propagation = Propagation.REQUIRED, isolation = Isolation.DEFAULT, rollbackForClassName = {"java.lang.Throwable"})
	public void saveOrder(Orders order){
		userDao.saveOrder(order);
	}

	public void getUpd(String wxOpenId, String token) {
		userDao.getUpd(wxOpenId, token);

	}

	public void updateUserInfo(String wxOpenId, String token) {
		userDao.updateUserInfo(wxOpenId, token);
	}


	public List<User> getSel(String appid) {
		// TODO Auto-generated method stub
		return userDao.getSel(appid);
	}

}
